ghostimage_mod = {
    allowedPages: [
        tuenti_lib.module.names.evento,
        tuenti_lib.module.names.pagina,
        tuenti_lib.module.names.gente,
        tuenti_lib.module.names.miembros
    ],
    init: function() {
        tuenti_lib.onchangepage.add(this, true);
    },
    onChangePage: function (response) {
        var url = (response ? response.request_object.url : document.location.href);
        var m = system_lib.url.getParam('m',  url);
        var user_id = system_lib.url.getParam('user_id',  url);

        if (this.allowedPages.indexOf(m) == -1 && !(m == tuenti_lib.module.names.perfil && user_id))
            return;

        var minis = system_lib.select('a img.outsideNetwork');

        for (var i = 0; i < minis.length; i++) {
            minis[i].parentNode.addEventListener("mouseover", this.minis.onmouseover, false);
            minis[i].parentNode.addEventListener("mouseout", this.minis.onmouseout, false);
        }
        
    },
    minis: {
        onmouseover: function() {
            this.firstChild.className = '';
        },
        onmouseout: function() {
            this.firstChild.className = 'outsideNetwork';
        }
    }
};

ghostimage_mod.init();